package leetcode.part1;

import java.util.Arrays;

public class S5 {
    public int majorityElement(int[] nums) {
        Arrays.sort(nums);
        int mid=nums.length/2;
        return nums[mid];
    }
}
